---
layout: single
property_name: grid-template-areas
---

<section id="grid-template-areas" class="property">
  <header class="property-header">
    <nav class="property-links">
        <a class="property-collection" href="{{site.url}}/css-grid/">
          In collection: <strong>CSS Grid</strong>
        </a>
      <a class="property-links-direct" href="{{site.url}}/property/grid-template-areas/" data-property-name="grid-template-areas" data-tooltip="Single page for this property">Permalink</a>
      <a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="grid-template-areas">Share</a>
        <a target="_blank" href="http://caniuse.com/#feat=css-grid" data-tooltip="See on Can I use..." rel="external">Can I use</a>
      <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/grid-template-areas" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
    </nav>
    <h2 class="property-name">
      <a href="#grid-template-areas"><span>#</span>grid-template-areas</a>
    </h2>
    <div class="property-description">
      <p>Defines areas within a <strong>grid container</strong>. These areas can then be referenced when placing a <strong>grid item</strong>.</p>

    </div>

  </header>

    <style type="text/css">.grid-template-areas { display: grid;padding: 0; }</style>




    <section class="example">
      <header class="example-header">
        <p class="example-name">
            <code class="example-default" data-tooltip="This is the property's default value">default</code>


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="grid-template-areas: none;">grid-template-areas: none;</code>
        </p>
        <div class="example-description">
          <p>No area is defined.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div grid-template-areas " id="grid-template-areas-none"><p class="block block--alpha">Header</p><p class="block block--beta">Sidebar</p><p class="block block--pink">Main</p></div>
        </div>
      </aside>
          <style type="text/css">#grid-template-areas-none{ grid-template-areas:none;}</style>
    </section>
    <section class="example">
      <header class="example-header">
        <p class="example-name">


          <code class="example-value" data-tooltip="Click to copy" data-clipboard-text="grid-template-areas: &quot;header header header&quot; &quot;sidebar main main&quot;;">grid-template-areas: &quot;header header header&quot; &quot;sidebar main main&quot;;</code>
        </p>
        <div class="example-description">
          <p>You can use <strong>area names</strong> to specify which cells each grid item should occupy.</p>

        </div>
      </header>

      <aside class="example-preview">
        <div class="example-browser"><i></i><i></i><i></i></div>
        <div class="example-output">
          <div class="example-output-div grid-template-areas " id="grid-template-areas-header-header-header-sidebar-main-main"><p class="block block--alpha">Header</p><p class="block block--beta">Sidebar</p><p class="block block--pink">Main</p></div>
        </div>
      </aside>
          <style type="text/css">#grid-template-areas-header-header-header-sidebar-main-main{ grid-template-areas:"header header header" "sidebar main main";}</style>
        <style type="text/css">#grid-template-areas-header-header-header-sidebar-main-main .block--alpha { grid-area: header; }#grid-template-areas-header-header-header-sidebar-main-main .block--beta { grid-area: sidebar; }#grid-template-areas-header-header-header-sidebar-main-main .block--pink { grid-area: main; }</style>
    </section>

</section>
